package com.example.hilt_mvvm_http.one

import android.os.Build
import com.example.hilt_mvvm_http.BuildConfig
import okhttp3.Interceptor
import okhttp3.Response

class HttpHeaderInterceptor:Interceptor {
    override fun intercept(chain: Interceptor.Chain): Response {
        val originRequest = chain.request()

        val newRequest = originRequest.newBuilder()
            .addHeader("Content-Language", BuildConfig.I18N_LANG)
            .addHeader("platform", "ANDROID")
            .addHeader("source", "CLUB_APP")
            .addHeader("Authorization", "")
            .addHeader("meid", "")
            .addHeader("version", BuildConfig.VERSION_NAME)
            .addHeader("phoneModel", Build.BRAND + "_" + Build.MODEL)
            .build()


        return chain.proceed(newRequest)


    }
}